#!/usr/bin/env python
# encoding=utf-8
from kartograph import Kartograph
from subprocess import call
import json


def generateWorldMap(outputFile='world.svg', configFile='world.json',
                     show=True):
    kartograph = Kartograph()
    with open(configFile) as f:
        config = json.load(f)
    kartograph.generate(config, outfile=outputFile)
    if show:
        call(['google-chrome', outputFile])


if __name__ == "__main__":
    generateWorldMap()
